<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_user".
 *
 * @property string $id
 * @property string $username 手机号
 * @property string $password
 * @property string $salt
 * @property string $email
 * @property string $regip
 * @property string $regdate
 * @property string $lastloginip
 * @property string $lastlogintime
 * @property int $secques
 * @property int $hashkey
 * @property int $del_flag
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property string $old_id 对应3.0的userId
 * @property string $project_id 联盟id
 */
class TBaseUser extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_user';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'username', 'password', 'salt', 'regdate', 'hashkey'], 'required'],
            [['regdate', 'lastlogintime', 'create_time', 'update_time'], 'safe'],
            [['secques', 'hashkey', 'del_flag'], 'integer'],
            [['id', 'create_by', 'update_by', 'old_id', 'project_id'], 'string', 'max' => 36],
            [['username'], 'string', 'max' => 255],
            [['password', 'regip', 'lastloginip'], 'string', 'max' => 32],
            [['salt'], 'string', 'max' => 6],
            [['email'], 'string', 'max' => 320],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'username' => 'Username',
            'password' => 'Password',
            'salt' => 'Salt',
            'email' => 'Email',
            'regip' => 'Regip',
            'regdate' => 'Regdate',
            'lastloginip' => 'Lastloginip',
            'lastlogintime' => 'Lastlogintime',
            'secques' => 'Secques',
            'hashkey' => 'Hashkey',
            'del_flag' => 'Del Flag',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'old_id' => 'Old ID',
            'project_id' => 'Project ID',
        ];
    }
}
